<template>
  <div class="learnOthers">
  	<img class="close" src="../assets/img/butuisong@2x.png" @click.stop.self="close(momentType, momentId)"/>
    <a :href="groupDetailUrl">
    	<div class="learnOthers_con">
    		<div class="touxiang">
          <avatar :src="Props.USER_PHOTO" :href="Props.USER_CODE"/>
    			<!-- <img :src="Props.USER_PHOTO !== ''? Props.USER_PHOTO : `${require('@/assets/img/touxiangBG@2x.png')}`"/> -->
    		</div>
    		<div class="info">
           <div class="info_name">
             <span class="v_name">{{Props.NICK_NAME}}</span>
           </div>
    			 <p class='info_con'>刚刚偷师了<span class="l_name">{{Props.TARGET_GROUP_INFO}}</span></p>
    			 <span class='go_other'>
    			 	 看看这个组合 >
    			 </span>
    		</div>
    	</div>
    </a>
    <slot></slot>
  </div>
</template>

<script>
import BottomBar from './common/BottomBar'
import MomentMixin from './MomentMixin'
import Avatar from './Avatar'

export default {
  name: 'learnOthers',
  props: {
    Props: Object
  },
  mixins: [MomentMixin],
  components: {
    Avatar,
    BottomBar
  },
  computed: {
    groupDetailUrl () {
      const { TARGET_USER_CODE, TARGET_GROUP_ID } = this.Props
      return `index.html${window.location.search}#/groupdetail?clientId=${TARGET_USER_CODE}&groupId=${TARGET_GROUP_ID}`
    }
  }
}
</script>

<style lang="less" scoped>
@import "./common/mixins.less";

.learnOthers {
  .moment;
  position: relative;
  .close {
  	position: absolute;
  	right: 4px;
  	top: 0px;
  	width: 34px;
  	height: 24px;
  }
}
.learnOthers_con {
	height: 143px;
	width: 100%;
	padding: 35px 35px 0 41px;
	box-sizing: border-box;
	display: flex;
	flex: 1;
	text-align: left;
}
.touxiang {
	width: 58px;
	height: 58px;
	margin-right: 17px;
	img{
		display: block;
		width: 58px;
	  height: 58px;
	}
}

.info_con {
	.info_con_font;
  .ellipsis();
	color: #777777;
	margin-bottom: 10px;
	.l_name {
		color: #FD363B;
	}
}
.go_other {
	.go_other_font;
}
</style>
